import { Column, Entity } from 'typeorm'
import { SoftCommonEntity } from '~/common/entity/common.entity'

@Entity({ name: 'sys_asr_task' })
export class AsrTaskEntity extends SoftCommonEntity {
  @Column({ name: 'url', type: 'varchar', length: 255, comment: '音频、视频链接url', default: '' })
  url: string

  @Column({ name: 'task_id', type: 'varchar', length: 255, comment: 'asr转换任务ID', default: '' })
  taskId: string

  @Column({ name: 'task_type', type: 'int', comment: '任务类型, 1 腾讯云 2 阿里云', default: 1 })
  taskType: number

  @Column({ name: 'asr_text', type: 'text', comment: 'asr识别文本', nullable: true })
  asrText: string

  @Column({ name: 'asr_url', type: 'varchar', length: 255, comment: '音频识别文本url', default: '' })
  asrUrl: string

  @Column({ name: 'status', type: 'int', comment: '状态, 0 未开始，1 进行中， 2 任务完成  3 任务失败', default: 0 })
  status: number
}
